<template>
	<!-- 创建邀约 -->
	<view class="content">
		<view class="message-box">
			<view class="box">
				<view class="item">
					<view class="">
						队伍名称：
					</view>
					<input class="right-name" type="text" v-model="fromData.name" placeholder="队伍名称" />
				</view>
				<view class="item">
					<view class="left">
						组队人数：
					</view>
					<picker @change="bindPickerChangeUserInfo" :value="fromData.userIndex" :range="fromData.kexuan">
						<view class="right-name">
							{{fromData.kexuan[fromData.userIndex]}}
						</view>
					</picker>
				</view>
			</view>
		</view>
		<view class="btn-box">
			<view class="btn" @click="senChuangjian()">
				确认发起邀约
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		reactive,
		ref
	} from 'vue'
	import {
		getCreateZhaomu
	} from '@/api/yaoyue_api.js'




	onLoad((option) => {
		fromData.id = option.id
		uni.getStorage({
			key: 'openid',
			success: function(res) {
				fromData.openid = res.data.openid
			}
		})
		console.log(option);
	})
</script>

<style lang="scss" scoped>
	.content {
		min-height: 100vh;

		.message-box {
			padding: 20rpx;

			.box {
				background-color: #53c3ff;
				padding: 20rpx;
				border-radius: 20rpx;
				height: 200rpx;
				flex-direction: column;
				display: flex;
				justify-content: space-around;

				.item {
					background-color: white;
					padding: 20rpx;
					border-radius: 10rpx;
					display: flex;

					.right-name {
						margin-left: 60rpx;
					}
				}
			}
		}

		.btn-box {
			padding: 0rpx 40rpx 40rpx 40rpx;
			position: fixed;
			bottom: 0;

			.btn {
				width: calc(100vw - 80rpx);
				text-align: center;
				padding: 40rpx 0;
				background-color: #53c3ff;
				border-radius: 20rpx;
				color: white;
			}
		}
	}
</style>